﻿<%@ Page Title="Sales Teams" Language="C#" MasterPageFile="~/Users/UserDefault.master" AutoEventWireup="true" CodeFile="SalesTeams.aspx.cs" Inherits="Users_SalesTeams" %>

<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">

    <script src="../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        $(function() {
            
              $("#ctl00_mainContent_btnJoin").attr("disabled", "disabled");

              $("#ctl00_mainContent_chkTerms").click(function() {
                
                var checked_status = this.checked;
                if (checked_status == true) {
                    $("#ctl00_mainContent_btnJoin").removeAttr("disabled");
                }
                else {
                    $("#ctl00_mainContent_btnJoin").attr("disabled", "disabled");
                }
            });        
        });
    </script>    

    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="SalesTeam" />
    <asp:Label CssClass="alarm" ID="lblResult" EnableViewState ="false" Text="" runat="server" Visible="false" />
    
    <div style="margin: 5% auto 0 auto; width: 50%;">
        <div style="text-align:center; font-size:Larger;">
            <br />
            <b>Ample Product Sales Team Signup Application</b>
            <br />
            <br />
        </div>
        <table cellpadding="2" cellspacing="2">
            <tr>
                <td width="35%">Qualifying Product Purchase :</td>
                <td><asp:DropDownList runat="server" ID="ddlPurchase" Width="75%"></asp:DropDownList></td>                
            </tr>
            <tr>
                <td>Referral Distributor Name:</td>
                <td><asp:TextBox ID="txtRefDistName" runat="server" Width="74%" ></asp:TextBox></td>
            </tr>
            <tr>
                <td>Referral Distributor ID:</td>
                <td>
                    <asp:TextBox ID="txtRefDistID" runat="server" Width="50%" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvalidator" runat="server" ValidationGroup="SalesTeam" ControlToValidate="txtRefDistID" ErrorMessage="Referral Distributor ID must not be blank.">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>Open Board No:</td>
                <td>
                    <asp:DropDownList runat="server" ID="ddlOpenBoard" Width="75%" 
                        AppendDataBoundItems="True">
                        <asp:ListItem Selected="True" Value="-1">Select a Open Board</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                    <div style="margin-left: 20%"><b> OR </b></div>                
                </td>
            </tr>
            <tr>
                <td>Sales Team Board No:</td>
                <td>
                    <asp:DropDownList runat="server" ID="ddlSalesTeam" Width="75%" 
                        AppendDataBoundItems="True">
                        <asp:ListItem Selected="True" Value="-1">Select a Board</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>My First Position Choice:</td>
                <td><asp:DropDownList runat="server" ID="ddlFirstPosChoice" Width="75%"></asp:DropDownList></td>
            </tr>
            <tr>
                <td>My Second Position Choice:</td>
                <td><asp:DropDownList runat="server" ID="ddlSecPosChoice" Width="75%"></asp:DropDownList></td>
            </tr>
            <tr>
                <td></td>
                <td><asp:CheckBox runat="server" ID="chkTerms" EnableViewState="false" Checked="false" Text="I have read and agreed to the Business Office Sales System rules stated below." /></td>
            </tr>
        </table>
        <div style="padding:5px; text-align:center">
            <asp:Button ID="btnJoin" runat="server" Text="Join Team" ValidationGroup="SalesTeam" onclick="btnJoin_Click" /> &nbsp;
            <asp:Button ID="btnCancel" runat="server" Text="Cancel" PostBackUrl="~/Users/Default.aspx" />       
        </div>        
    </div>
</asp:Content>

